package org.karelun.rabbit.rcp;

import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;

public class ApplicationActionBarAdvisor extends ActionBarAdvisor {

	private IWorkbenchAction saveAction;

	private IWorkbenchAction undoAction;

	private IWorkbenchAction redoAction;

	private IWorkbenchAction deleteAction;

	private IWorkbenchAction copyAction;

	private IWorkbenchAction cutAction;

	private IWorkbenchAction pasteAction;

	private IWorkbenchAction selectAllAction;

	public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
		super(configurer);
	}

	protected void makeActions(IWorkbenchWindow window) {
		saveAction = ActionFactory.SAVE.create(window);
		undoAction = ActionFactory.UNDO.create(window);
		redoAction = ActionFactory.REDO.create(window);
		copyAction = ActionFactory.COPY.create(window);
		cutAction = ActionFactory.CUT.create(window);
		pasteAction = ActionFactory.PASTE.create(window);
		deleteAction = ActionFactory.DELETE.create(window);
		selectAllAction = ActionFactory.SELECT_ALL.create(window);

		register(saveAction);
		register(undoAction);
		register(redoAction);
		register(copyAction);
		register(cutAction);
		register(pasteAction);
		register(deleteAction);
		register(selectAllAction);
	}
}
